package com.taotao.job.rpc.core.invoker;

import com.taotao.job.rpc.core.meta.IfaceMeta;
import lombok.AllArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.ToString;

/**
 * 执行接口的元数据
 *
 * @author fanbeibei
 * @date 2020/10/31 12:27
 */
@Getter
@EqualsAndHashCode
@ToString
@AllArgsConstructor
public class InvokerMeta {
    protected IfaceMeta ifaceMeta;

    /**
     * 执行接口的参数
     */
    protected Object[] args;

    protected long timeoutMillis = 3000;

    public InvokerMeta(IfaceMeta ifaceMeta, Object[] args) {
        this.ifaceMeta = ifaceMeta;
        this.args = args;
    }


    public IfaceMeta extractIfaceMeta() {
        return this.ifaceMeta;
    }

}
